package com.java1412.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author java1412
 * @since 2024-01-10 16:45:18
 */
@FeignClient(value = "SERVICE-HI", fallback = SchedualServiceHiHystrix.class) // 作为feign的客户端,value属性是注册中心的名称
// fallback：指定兜底方案所在类
public interface SchedualServiceHi {
    @RequestMapping(value = "/hi", method = RequestMethod.GET)
    public String home(
            @RequestParam(value = "name", defaultValue = "java1412") String name
    );
}
